/*******************************************************************************
 * Copyright (c) 2014 Steffen Mikkelsen
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Steffen Mikkelsen - initial API and implementation
 ******************************************************************************/
package com.subsecret.secureconnection.securestream.stream.gzip;

import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.GZIPOutputStream;

import com.subsecret.secureconnection.securestream.layers.gzip.GZIPCompressionLayer.DeflaterCompression;
import com.subsecret.secureconnection.securestream.layers.gzip.GZIPCompressionLayer.DeflaterStrategy;

public class GZIPCompressionOutputStream extends GZIPOutputStream {
    
    public GZIPCompressionOutputStream(OutputStream out, DeflaterCompression compression, DeflaterStrategy strategy)
            throws IOException {
        super(out, true);
        def.setLevel(compression.val);
        def.setStrategy(strategy.val);
    }
    
    public GZIPCompressionOutputStream(OutputStream out, int compression, int strategy) throws IOException {
        super(out, true);
        def.setLevel(compression);
        def.setStrategy(strategy);
    }
    
}
